home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1161 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: newshost.lanl.gov!tanmoy
  2. From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: 2 C under VMS questions
  5. Date: 11 Jan 1996 20:04:49 GMT
  6. Organization: Los Alamos National Laboratory
  7. Distribution: world
  8. Message-ID: <TANMOY.96Jan11130449@qcd.lanl.gov>
  9. References: <4d3eok$hm4@netope.harvard.edu>
  10. NNTP-Posting-Host: qcd.lanl.gov
  11. Mime-Version: 1.0
  12. Content-Type: text
  13. In-reply-to: richard@phdcn.harvard.edu's message of 11 Jan 1996 16:44:04 GMT
  14.  
  15. --text follows this line--
  16. In article <4d3eok$hm4@netope.harvard.edu> richard@phdcn.harvard.edu
  17. (Richard Congdon) writes: 
  18. <snip> 
  19.    A couple questions for VMS C gurus"
  20.  
  21. I know hardly anything about VMS C.
  22.  
  23.    1) Is there any way to do this on VMS?
  24.            freopen(optarg,"rt",stdin)
  25.       This call fails.  Do I want something other than stdin?
  26.  
  27. if you want to reopen stdin, I fail to see how you can want anything
  28. else. If optarg is a pointer to the first character of a string, then
  29. why not try the ANSI standard 
  30.       
  31.       freopen(optarg,"r",stdin);
  32.  
  33. instead. (At least, if that does not work, you can compiler it on an
  34. ANSI C system on the VMS: one must exist :-)
  35.  
  36.    2) Is there any functional equivalent to Unix ftruncate() or DOS chsize()?
  37.  
  38. Don't know. You can trivially change something to zero size, but more
  39. than that I do not know.
  40.  
  41. Cheers
  42. Tanmoy
  43. --
  44. tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
  45. Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
  46. Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
  47. <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
  48. internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
  49. fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
  50.